<?php

namespace App\Models\ActivityDB\ValentinesDayNetwork;

use Illuminate\Database\Eloquent\Model;

class VdUser extends Model
{
    protected $table    = 'ac_valen_network_user';
    public $connection = 'mysql_activity';

    public $timestamps = false;
    protected $fillable = [
        'id',           //主键ID
        'user_id',      //用户ID
        'score',    //分数
        'last_gift_id',    //上次统计礼物积分的时间
    ];

    public function initUser($user_id){
        $data = [
            'user_id' => $user_id,
            'score' => 0,
        ];
        return $this->create($data);
    }
}
